<HEADER>
<TITLE>The HTTP Protocol As Implemented In W3</TITLE>
<NEXTID N="17">
</HEADER>
<BODY>
<H1>HTTP as implemented in WWW</H1>This document defines the Hypertext
Transfer protocol  (HTTP) as currently
implemented by the <A
NAME=15 HREF="../../TheProject.html">WorldWideWeb</A> initaitive
software. This is a subset of the
<A
NAME=1 HREF="../HTTP.html">proposed</A> full HTTP protocol.  No
client profile information is transferred
with the query. Future HTTP protocols
will be back-compatible with this
protocol.<P>
The definition of this protocol is
in the public domain (see <A
NAME=16 HREF="../../Policy.html">policy</A>
).<P>
The protocol  uses the normal internet-style
telnet protocol style on a TCP-IP
link. The following describes how
a client acquires a (hypertext) document
from an HTTP server, given an HTTP
document <A
NAME=6 HREF="../../Addressing/HTTPAddressing.html">address</A> .
<H2>Connection</H2>The client makes a TCP-IP connection
to the host using the <A
NAME=7 HREF="../../Addressing/BNF.html#5">domain name</A>
or <A
NAME=8 HREF="../../Addressing/BNF.html#45">IP number</A> , and the <A
NAME=9 HREF="../../Addressing/BNF.html#7">port number</A>
 given in the address.<P>
If the port number is not specified,
80 is always assumed for HTTP.<P>
The server accepts the connection.<P>
Note: HTTP currently runs over TCP,
but could run over any connection-oriented
service.   The interpretation of
the protocol below in the case of
a sequenced packet service (such
as DECnet(TM) or ISO TP4) is that
that the request should be one TPDU,
but the response may be many.
<H2>Request</H2>The client sends a document request
consisting of a line of ASCII characters
terminated by a CR LF (carriage return,
line feed) pair. A well-behaved server
will not require the carriage return
character.<P>
This request consists of the word
"GET", a space, the <A
NAME=10 HREF="../../Addressing/BNF.html#1">document address</A>
, omitting the "http:, host and port
parts when they are the coordinates
just used to make the connection.
(If a gateway is being used, then
a full document address may be given
specifying a different naming scheme).<P>
The search functionality of the protocol
lies in the ability of the addressing
syntax to describe a <A
NAME=14 HREF="../../Addressing/Search.html">search on a
named index</A> .<P>
A search should only be requested
by a client when the index document
itself has been descibed as an index
using the  <A
NAME=12 HREF="../../MarkUp/Tags.html#18">ISINDEX tag</A> .
<H2>Response</H2>The response to a simple GET request
is a message in hypertext mark-up
language (<A
NAME=11 HREF="../../MarkUp/MarkUp.html"> HTML</A> ). This is a byte
stream of ASCII characters. <P>
Lines shall be delimited by an optional
carriage return followed by a mandatory
line feed chararcter. The client
should not assume that the carriage
return will be present.  Lines may
be of any length. Well-behaved servers
should retrict line length to 80
characters excluding the CR LF pair.<P>
The format of the message is HTML
- that is, a trimmed SGML document.
Note that this format allows for
menus and hit lists to be returned
as hypertext. It also allows for
plain ASCII text to be returned following
the  <A
NAME=13 HREF="../../MarkUp/Tags.html#7">PLAINTEXT tag</A> .<P>
The message is terminated by  the
closing of the connection by the
server.<P>
Well-behaved clients will read the
entire document as fast as possible.
The client shall not wait for user
action (output paging for example)
before reading the whole of the document.
 The server may impose a timeout
of the order of 15 seconds on inactivity.<P>
Error responses are supplied in human
readable text in HTML syntax. There
is no way to distinguish an error
response from a satisfactory response
except for the content of the text.
<H2>Disconnection</H2>The TCP-IP connection is broken by
the server when the whole document
has been transferred.<P>
The client may abort the transfer
by breaking the connection before
this, in which case the server shall
not record any error condition.<P>
Requests are <A
NAME=2 HREF="../HTTP.html#13">idempotent</A> .  The server
need not store any information about
the request after disconnection.<P>
_________________________________________________________________
<ADDRESS><A
NAME=0 HREF="../../../TBL_Disclaimer.html">Tim BL</A></A>
</ADDRESS></BODY>
